package com.MediaVaultTest;

import java.io.IOException;

import javax.jdo.PersistenceManager;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import javax.jdo.Extent;

public class ResetQuota extends HttpServlet {
	
	public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws IOException {
		PersistenceManager pm = PMF.get().getPersistenceManager();
		Extent<UserStore> extent = pm.getExtent(UserStore.class, false);
	    for (UserStore u : extent) {
	        u.setmbDownload(0);
	        u.setmbUpload(0);
	    }
	    extent.closeAll();
		pm.close();
	}
}
